package com.qf.j2105.controller;

import com.qf.j2105.po.Good;
import com.qf.j2105.service.AddreDetaiedService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class AddresDetaiedController {
    @Autowired
    private AddreDetaiedService addreDetaiedService;

    @RequestMapping("/findaddresgood")
    @ResponseBody
    //查询地址下的车辆情况
    public List<Good> findAddresGood(String name) {
        System.out.println("name = " + name);

        System.out.println(111);
        List<Good> goods = addreDetaiedService.selectByname(name);
        if (goods != null) {
            return goods;
        } else {
            return null;
        }

    }
}
